// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-20

package kind

// PondSeat
// 座位类型.
type PondSeat int

const (
	_ PondSeat = iota
	PondSeatFixed
	PondSeatFree
)

var (
	pondSeatTexts = map[PondSeat]string{
		PondSeatFixed: "固定钓位",
		PondSeatFree:  "自选钓位",
	}
	pondSeatTextOther = "其它"

	pondSeatFlags = map[PondSeat]string{
		PondSeatFixed: "fixed",
		PondSeatFree:  "free",
	}
	pondSeatFlagOther = "other"
)

func PondSeatDict() []map[string]any {
	var res = make([]map[string]any, 0)
	for _, v := range []PondSeat{
		PondSeatFixed,
		PondSeatFree,
	} {
		res = append(res, map[string]any{
			"Key":   v,
			"Value": v.Text(),
		})
	}
	return res
}

func (o PondSeat) Flag() string {
	if str, ok := pondSeatFlags[o]; ok {
		return str
	}
	return pondSeatFlagOther
}

func (o PondSeat) Text() string {
	if s, ok := pondSeatTexts[o]; ok {
		return s
	}
	return pondSeatTextOther
}
